<?php
class ShowAction extends Action{
	public function Index(){
		 //echo p($_GET);die;
		echo 1111;
		$id=$_GET['id'];
		$where=array('id'=>$id);
		$field=array('title','id','time','click','content');
				
		$this->blog=M('blog')->where($where)->find();
		//p($this->blog['content']);die;
		// p($this->blog);die;
		import('Class.Category',APP_PATH);
		$cate=M('cate')->select();
		$cid=$this->blog['cid'];
		$this->parent=Category::getParents($cate,$cid);
		
		$this->display();
	}

	public function IncClick(){
		$id=$_GET['id'];
		$where=array('id'=>$id);
		$click=M('blog')->where($where)->getField('click');
		M('blog')->where($where)->setInc('click');
       
        echo 'document.write('.$click.')';
	}
}


?>